/*
 * @Author: chen haoxuan
 * @Date: 2021-06-13 22:49:21
 * @LastEditTime: 2021-06-13 23:05:14
 */
#include<iostream>
#include"Point.cpp"
using namespace std;
class Circle:public Point
{
  public:
    Circle(float,float,float x=0,float y=0,float r=0);
    void setRadius(float);
    float getRadius(){return radius;}
    float area() const;
    friend ostream & operator <<(ostream &,const Circle&);
  private:
    float radius;
};
Circle::Circle(float a,float b,float x,float y,float r):Point(a,b),radius(r){}

void Circle::setRadius(float r)
{ 
  radius=r;
}

float Circle::area() const
{
  return 3.14159*radius*radius;
}
ostream & operator <<(ostream&output,const Circle&c)
{
  output<<"Center=["<<c.x<<","<<c.y<<"],r="<<c.radius<<",area="<<c.area()<<endl;
  return output;
}